package com.sky.mapper;

import com.sky.entity.Setmeal;
import com.sky.entity.SetmealDish;
import com.sky.vo.SetmealVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SetmealDishMapper {
    /*
    * 根据菜品id查询是否有套餐关联
    * */
    List<SetmealDish> findConnection(long[] ids);


    /*
    * 根据套餐id查出菜品id
    * */
    long[] findConnectBysetmealId(long setmealId);

    void insert(List<SetmealDish> setmealDishes);

    void deleSetmealDish(long[] ids);

    @Select("select * from setmeal_dish where setmeal_id = #{id}")
    List<SetmealDish> findConnectionBysetmealId(long id);

    @Select("select * from setmeal where id = #{id}")
    SetmealVO findsetmealData(long id);



}
